package xyz.yeidi.service.impl;

import xyz.yeidi.dao.api.UserDao;
import xyz.yeidi.dao.impl.UserDaoImpl;
import xyz.yeidi.pojo.User;
import xyz.yeidi.service.api.UserService;

/**
 * @Author JIP
 * @Date 2021-07-29 15:33
 * @Version 1.0
 * @Describe :
 */
public class UserServiceImpl implements UserService {
    private static UserDao userDao = new UserDaoImpl();
    @Override
    public String getUserByName(String name) {
        return userDao.getUserByName(name);
    }

    @Override
    public User getUserById(Integer id) {
        return userDao.getUserById(id);
    }

    @Override
    public User getUserByNameAndPassword(String name, String password) {
        return userDao.getUserByNameAndPassword(name,password);
    }

    @Override
    public Integer addUser(User user) {
        return userDao.addUser(user);
    }
}
